/*
 * $Id: CompoundRootList.java
 * Created on 2005-1-4 16:03:03
 */
package cn.donave.framework.utils;

import java.util.ArrayList;
import java.util.List;

/**
 * 
 * @author Tim Du
 * @version $Revision: 2.0$
 */
public final class CompoundRootList extends ArrayList {

	public CompoundRootList() {
	}

	public CompoundRootList(List list) {
		super(list);
	}

	public CompoundRootList cutStack(int index) {
		return new CompoundRootList(subList(index, size()));
	}

	public Object peek() {
		return get(0);
	}

	public Object pop() {
		return remove(0);
	}

	public void push(Object o) {
		add(0, o);
	}
}
